﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using Innova.Repository.Mapp;
using Innova.Entites;

namespace Innova.Repository
{
    public partial class INNOVAContext : DbContext
    {
        static INNOVAContext()
        {
            Database.SetInitializer<INNOVAContext>
                (
               null
                //new DropCreateDatabaseAlways<INNOVAContext>()
                //new CeycaDatabaseInitializer()
                );
        }

        public INNOVAContext() : base("Name=INNOVAContext")
        { 

        }

        public DbSet<CATEGORIA> CATEGORIAs { get; set; }
        public DbSet<NEWS> NEWSs { get; set; }
        public DbSet<PATROCINADOR> PATROCINADORes { get; set; }
        public DbSet<RESERVA> RESERVAs { get; set; }
        public DbSet<SERVICIO> SERVICIOs { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new CategoriaMap());
            modelBuilder.Configurations.Add(new NewsMap());
            modelBuilder.Configurations.Add(new PatrocinadorMap());
            modelBuilder.Configurations.Add(new ReservaMap());
            modelBuilder.Configurations.Add(new ServicioMap());
        }


    }
}
